//
//  HACTableviewSection.h
//  HACDispatcher
//
//  Created by Chengjie on 2019/5/7.
//

#import <UIKit/UIKit.h>
#import "HACTableViewSectionProtocol.h"
#import "HACTableViewCellModelProtocol.h"

NS_ASSUME_NONNULL_BEGIN

@interface HACTableviewSection : NSObject <UITableViewDelegate, UITableViewDataSource, HACTableViewSectionProtocol>
/// 所有的cellModels
@property (nonatomic, strong) NSMutableArray<id<HACTableViewCellModelProtocol>> *cellModels;

/// 前一个
@property (nonatomic, strong, readonly) HACTableviewSection *prefixSection;
/// 后一个
@property (nonatomic, strong, readonly) HACTableviewSection *suffixSection;

#pragma mark -HACTableViewSectionProtocol
/// 子类需要重写以注册
- (void)registTableReusableView;
@property (nonatomic, assign) CGFloat rankingWeight;
@property (nonatomic, weak) UITableView *tableView;
@property (nonatomic, weak) UIViewController *viewController;
@property (nonatomic, assign, readonly) NSUInteger sectionIndex;
// 局部刷新
- (void)reloadSection;

@end

NS_ASSUME_NONNULL_END
